File

interface File

A file data. Depending on how the request was constructed can contain the path to a file, or the bytes representing a file. Contains the path when the value is taken from an <input type="file"> element of the submitted form. May contain bytes in case the request in the multipart/form-data format was constructed manually in a JavaScript code.

Types

Link copied to clipboard
class Builder
A builder of File.

Functions

Link copied to clipboard
Returns the file value as an array of bytes.
Link copied to clipboard
open fun contentType(): String
Returns a string that represents the content type determined by the file extension.
Link copied to clipboard
open fun name(): String
Returns a string that represents the file name.
Link copied to clipboard
Creates a new File builder.
Link copied to clipboard
Returns the file value as a file path.